package com.ruoyi.system.dao;

import java.util.List;

import com.ruoyi.system.domain.SysRoleOrg;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

/**
 * 角色与组织关系信息Mapper接口
 *
 * @author youde
 * @date 2022-11-16
 */
@Repository
public interface SysRoleOrgDAO extends JpaSpecificationExecutor<SysRoleOrg>, JpaRepository<SysRoleOrg, String> {

    /**
     * 根据角色id查询关系的组织信息
     *
     * @param roleId
     * @return
     */
    public List<SysRoleOrg> findByRoleId(String roleId);

    public int deleteByRoleId(String roleId);

}